import java.util.Scanner;

public class Text1 {
    //笔试强训新一期第二天  第一题 : 牛牛的快递
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        //输入
        float a = in.nextFloat();
        char b = in.next().charAt(0);
        int sum = 0;
        if(a <= 1.0) {
            sum += 20;
        }else {
            sum = 20;
            sum  += a/1 -1;
            if(a % 1 != 0) {
                sum = sum + 1;
            }
        }

        if(b == 'y') {
            sum = sum + 5;
        }

        System.out.print(sum);
    }
}
